<?if($this->anio):?>
<script>
<?php $this->placeholder('onReady')->captureStart() ?>
      	$(".changePlan").change(function () {
	        var id= this.id;
            var dato=this.value
	        
            dato=dato.split(',').join('.');
	        $('#'+id).val(dato);
            

	        if(isNaN(dato)){
        		$('#'+id).addClass('ui-state-error');
        		return true;
       		}

       		var aux=id.split('-')

	        $.post('<?=$this->baseUrl('cuentas-electricidad/editar')?>',{id_naturaleza:aux[0],anio:aux[1],mes:aux[2],idZona:aux[3],tipo:aux[4],dato:dato,version:<?=$this->version?>}, function(data){
                 if(data.status=='ok'){
	  				$('#'+id).removeClass('ui-state-error').css('color','green');
	  				$('#total-'+aux[0]).html(data.suma);
                }else{
                    alert(data);
                }
      		}); 
 	 	})      
  
<?php $this->placeholder('onReady')->captureEnd() ?>

</script>
<style>


</style>

<div class="contenedor_tablesorter">

<table class="tabla_cuentas_registro" id="myTable1" width="98%"> 
<caption>

<h1 class="h1_head ui-widget-header" style="">
<?=$this->translate('Registro Plan Electricidad '.$this->anio .' '.$this->zona)?>
</h1>

</caption>
<thead>
<tr class="ui-state-hover">
<th></th>
<?foreach($this->meses as $v):?>
    <th><?=$v?></th>
<?endforeach?>
<th>Anual</th>
</tr>
</thead>
<tbody>
<tbody>


<?php echo $this->factura_compania;?>
<?php echo $this->materiales;?>
<?php echo $this->mano_obra;?>
<?php echo $this->imputacion;?>
<?php echo $this->renting;?>
<tr class="ui-widget-header"><td colspan="14">&nbsp;</td></tr>
<?php echo $this->inversa;?>
<tr class="ui-widget-header"><td colspan="14">&nbsp;</td></tr>
<?php echo $this->inmovilizado_manoobra;?>
<?php echo $this->inmovilizado_materiales;?>
</tbody>
</table>
</div>

<div style="clear:both"></div>
    
<?endif;//anio	?>
    	